package org.pp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品属性维度，如颜色
 * </p>
 *
 * @author haima
 * @since 2024-06-09
 */
@Getter
@Setter
@TableName(value = "pp_goods_attr",autoResultMap = true)
@Schema(name = "PpGoodsAttr", description = "商品属性维度，如颜色")
public class PpGoodsAttr implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "属性Id")
    @TableId(value = "attr_id", type = IdType.AUTO)
    private Long attrId;

    @Schema(description = "商品id")
    private Long goodsId;

    @Schema(description = "属性名称")
    private String name;

    @Schema(description = "属性可选值，字符串的jsonArray")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private String[] vals;

    @Schema(description = "租户号")
    private Long tenantId;

    @Schema(description = "乐观锁")
    private Integer revision;

    @Schema(description = "创建时间")
    private LocalDateTime createdTime;

    @Schema(description = "更新时间")
    private LocalDateTime updatedTime;

    @Schema(description = "逻辑删除 1为删除 0为正常")
    private Boolean deleted;
}
